   
   // 退出登录
let exit =document.querySelector('.exit')
let login = document.querySelector('#login_a')
if(localStorage.getItem('username') ){
    login.innerHTML ="您已登录"
    exit.style.display='inline-block'
}
console.log(exit);
exit.onclick = function(){
    console.log(1);
    localStorage.removeItem('username')
  localStorage.removeItem('pass')
  login.innerHTML="登录" 
  exit.style.displa ="none"
}
login.onclick =function(){
    if (!localStorage.getItem('username')) {
        location.href="http://localhost:2205/html/login.html"
    }
}// 轮播
   var mySwiper = new Swiper('.swiper', {
    autoplay:true,// 时间停留3秒自动切换
    effect: 'fade',// 淡入
    keyboard: true,// 键盘和可以操作

    loop: true, // 循环模式选项

    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination',
    },

    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },


}) 
   
  